package com.bingxue.edu.service;

import com.alibaba.fastjson.JSON;
import com.bingxue.edu.management.education.model.resp.exam.ExamQuestionResp;
import com.bingxue.edu.management.education.service.exam.ExamQuestionService;
import com.bingxue.edu.management.education.service.exam.ExamRecordService;
import com.bingxue.edu.parent.model.resp.ParentMyScoreDetailResp;
import com.bingxue.edu.parent.service.StudentExamService;
import com.mybatisflex.core.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.List;

import static com.bingxue.edu.management.education.model.entity.exam.table.ExamQuestionTableDef.EXAM_QUESTION;

@Slf4j
@SpringBootTest
public class ExamRecordTest {

    @Autowired
    private ExamRecordService examRecordService;

    @Autowired
    private StudentExamService studentExamService;
    @Autowired
    private ExamQuestionService examQuestionService;
    @Test
    public void test() {
        //ExamScoreTableResp scoreTable = examRecordService.getScoreTable("1");
        //List<ExamRecordAggregateResp> examRecordAggregateRespList=examRecordService.getExamRecordAggregateList("1");
//        QueryWrapper examQuestionQueryWrapper = QueryWrapper.create()
//                .select(EXAM_QUESTION.ALL_COLUMNS)
//                .where(EXAM_QUESTION.EXAM_ID.eq("1"));
//        List<ExamQuestionResp> examQuestionRespList=examQuestionService.listAs(examQuestionQueryWrapper,ExamQuestionResp.class);

        ParentMyScoreDetailResp myScoreDetail = studentExamService.getMyScoreDetail("1");
        log.info("结果：{}", JSON.toJSONString(myScoreDetail));
    }
}
